package com.sunfeng.elasticsearch.utils;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;

/**
 * @Author : 孙峰
 * @Description:
 * @Date : 2022/4/25  10:11
 */
public class ClientUtils {
    private static RestHighLevelClient client;

    static {
        client = new RestHighLevelClient(
                RestClient.builder(new HttpHost("192.168.139.187", 9200, "http"))
        );
    }

    public static RestHighLevelClient getInstance() {

        return client;
    }
}
